package com.hj.authority.service;


import com.hj.authority.domain.dto.SysUserDTO;
import com.hj.authority.domain.entity.SysUser;
import com.hj.mybatis.service.BaseService;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * @author hj
 * @Date 2023/4/27
 * @Description: 用户管理
 */
public interface SysUserService extends BaseService<SysUser> {


    /**
     * 保存一个新用户
     *
     * @param vo SysUserDTO
     */
    void save(SysUserDTO vo);

    /**
     * 根据账号获取用户
     *
     * @param username 账号
     * @return SysUser
     */
    SysUser getByUsername(String username);

    /**
     * 根据用户获取权限等
     *
     * @param userEntity SysUser
     * @return UserDetails
     */
    UserDetails getUserDetails(SysUser userEntity);




}
